home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / 4cmp22s.zip / READ.ME < prev    next >
Text File  |  1994-10-30  |  11KB  |  248 lines

  1.                                 What is ForthCMP?
  2.  
  3.  
  4.      ForthCMP is the Forth language compiler for computers running MS-DOS.
  5.      Features of ForthCMP:
  6.  
  7.      ∙    Compiles Forth into machine code -- not interpreted.
  8.  
  9.      ∙    ForthCMP is written in Forth so that Forth code can be executed
  10.           during compilation, as is customary in Forth applications.
  11.  
  12.      ∙    Very fast -- ForthCMP compiles Forth code into an executable file
  13.           in a single pass. 
  14.  
  15.      ∙    Generated code is extremely compact. Over 110 Forth "primitives"
  16.           are compiled in-line. ForthCMP performs constant expression
  17.           folding, strength reduction, register optimization, DO...LOOP
  18.           optimization, tail recursion, and various "peephole"
  19.           optimizations.
  20.  
  21.      ∙    Built-in assembler.
  22.  
  23.      ∙    Libraries are in source format.
  24.  
  25.      ∙    ForthCMP supports many memory models, none big, but several not 
  26.           often found in compilers:
  27.           °    Single segment COM file, fixed at 64k bytes
  28.           °    As above, but minimized segment size for TSRs
  29.           °    Separate code and data segment EXE file
  30.           °    Device driver SYS format
  31.           °    Romable program, uninitialized ram
  32.           °    Romable program, data ram initialized from rom image 
  33.           °    Any of the above can have a separate stack segment for
  34.                return and parameter stacks
  35.  
  36.      ∙    Functions exist for allocating memory in additional segments, or
  37.           allocating arrays on the stack, to handle programs with large
  38.           data memory requirements.
  39.  
  40.      ∙    Library support:
  41.           °    Much of the ANS Forth standard, except for functions that 
  42.                do not make sense in a compiled environment.
  43.           °    Many additional words that are non-standard but widely
  44.                accepted.
  45.           °    Direct Display Writing library for fast display of text in 
  46.                color, and positioned on screen.
  47.           °    Multitasker with message passing facility and timed sleeps.
  48.           °    Library to support writing "Filter" programs.
  49.           °    MS-DOS file interface, compatible with LMI Forths.
  50.           °    String support, compatible with ANS Forth standard and LMI 
  51.                Forths.
  52.  
  53.                              The History of ForthCMP
  54.  
  55.      ForthCMP started as a project to selectively compile colon definitions
  56.      as code words in figForth back in 1982. I bundled this Native Code
  57.      Compiler with a Z-80 (tm Zilog) fig Forth I sold for embedded system
  58.      use at that time. Ray Duncan of Laboratory Microsystems was interested
  59.      in this product, and I ported it to LMI's Z-80 Forth for sale with his
  60.      Forth environment.
  61.  
  62.      The Native Code Compiler was translated to the 8088 processor, and
  63.      more recently to the 80386. It still comes bundled with LMI's Forth
  64.      products.
  65.  
  66.      In 1984 I became interested in the idea of a Forth compiler that would
  67.      compile entire applications into machine code rather than selected
  68.      colon definitions. Such a compiler would be capable of many additional
  69.      optimizations not available in a mixed system. Thus CFORTH, as it was
  70.      called, was born. The original version was for the Z-80, but a
  71.      Microsoft MS-DOS version was soon to follow. Laboratory Microsystems
  72.      sold CFORTH until roughly 1987 when it was removed from their catalog.
  73.      My feeling was that CFORTH simply wasn't understood, and that the wide
  74.      distribution of the reincarnated version, ForthCMP will have greater
  75.      acceptance.
  76.  
  77.      I renamed the compiler to avoid confusion with C-Forth (Forth in C)
  78.      that has been available for the past few years.
  79.  
  80.      ForthCMP does have a few changes from the CFORTH predecessor. Unlike
  81.      other compilers which seem to make application size grow with each new
  82.      release, ForthCMP programs take less memory than they did when
  83.      compiled with CFORTH. The startup code has been enhanced, and I've
  84.      added new optimizations for several common situations. I also made
  85.      changes to make ForthCMP run in Microsoft Windows, and under DOS 5.0.
  86.      I improved the way romable applications can be built, and added a new
  87.      memory model to allow creation of DOS device drivers (SYS files).
  88.  
  89.      When CFORTH was sold, it ran faster than C compilers, and created
  90.      executables that were far smaller and faster. C compiler technology is
  91.      catching up; for instance the most recent versions of Microsoft and
  92.      Borland Cs allow passing arguments in registers, something that CFORTH
  93.      did back in 1984. But the C compilers have gotten much bigger and
  94.      slower over the years. ForthCMP still runs fine on a machine without a
  95.      hard disk. The compiler is only about 32k bytes long.
  96.  
  97.                              ForthCMP is "Shareware"
  98.  
  99.      Forth is one of very few programming languages whose adherents tend to
  100.      feel that their compilers should be free. Unfortunately this has
  101.      doomed the language to a second rate status because nobody can make a
  102.      living selling Forth tools. I have realized that myself, having only
  103.      made enough money to pay for my computer systems over the years with
  104.      Forth.
  105.  
  106.      There does seem to be quite a market for Forth books and manuals, as
  107.      all of this free software does seem to be rather poorly documented. I
  108.      am taking a novel approach in distributing ForthCMP. This archive file
  109.      contains all ForthCMP libraries and all demo programs. But there is no
  110.      documentation. 
  111.  
  112.      To evaluate ForthCMP, place all the files in one directory and compile
  113.      some of the sample programs. The program DEMO.4TH is well enough
  114.      documented to give you a good start in writing your own ForthCMP
  115.      programs. Use DEBUG to examine the generated code -- you will find it
  116.      is quite good, often combining sequences of Forth primitives into a
  117.      single machine instruction.
  118.  
  119.      If you like what you see, you can register your copy of ForthCMP and
  120.      obtain the users' manual (123 page, laser printed) and a
  121.      disk with the latest version for $50.00. Send a personal check or
  122.      money order; I do not accept COD orders or credit cards, but I do ship
  123.      quickly without waiting for checks to clear. Customers outside the US
  124.      please remit in US funds $60.00 to cover the additional shipping
  125.      costs. Please specify floppy disk size and capacity.
  126.  
  127.      An 83-Standard version is also available for the same price, or order
  128.      both for an additional $25.
  129.  
  130.      I'm a hungry guy, so please register within 30 days. I won't be
  131.      pleased if you distribute an application using ForthCMP without first
  132.      registering. (It's also a copyright violation).
  133.  
  134.      If you own a copy of any Laboratory Microsystems (LMI) Forth with
  135.      software floating point, send a photocopy of the first page of the
  136.      software floating point section of the manual with your order and
  137.      receive a disk containing software floating point for ForthCMP at no
  138.      additional charge.
  139.  
  140.      Mail your order to:
  141.  
  142.           Tom Almy
  143.           17830 SW Shasta Trail
  144.           Tualatin, OR  97062
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.                                 ForthCMP's Future
  153.  
  154.      ForthCMP is now available in an ANS Forth version as well as this
  155.      83 Standard version. You can order both versions at the same time
  156.      for $75 ($85 outside the USA).
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.                                 Distributed Files
  165.  
  166.      Here is a brief description of the distribution files:
  167.  
  168.      The heart of the matter:
  169.      4c.ico              Icon for Microsoft Windows 3.x
  170.      4c.pif              PIF file for Microsoft Windows 3.x
  171.      readme.doc          This file
  172.      4c.com              The compiler executable
  173.  
  174.      Library files:
  175.  
  176.      display1.4th        Fast direct display output
  177.      display2.4th         Second part of above
  178.      dos1.4th            File I/O
  179.      dos2.4th             Second part of above
  180.      dosgo.scr           Initialization code, COM format
  181.      exec.4th            EXEC function (DOS shell)
  182.      exego.scr           Initialization code, EXE format
  183.      farmem1.4th         "Far" memory allocation
  184.      farmem2.4th          Second part of above
  185.      filter.4th          Used to write "filter" type programs
  186.      forthlib.scr        Basic library
  187.      ints.4th            Used for writing interrupt handlers
  188.      multi.4th           Multitasker
  189.      multid.4th          Multitasker with direct display output
  190.      romgo.4th           Example initialization code, ROM format
  191.      strings1.4th        String functions
  192.      strings2.4th         Second part of above
  193.      vars.4th            83 Standard variables
  194.  
  195.      Demo and utility programs:
  196.  
  197.      bytebnch.4th        The old Byte Magazine sieve benchmark
  198.      copies.4th          Merges screen files
  199.      defining.4th        Examples of defining word usage
  200.      demo.4th            Generic Demo -- read this first
  201.      driver.4th          Example device driver
  202.      enscreen.4th        Convert ASCII to screen file
  203.      ffind.4th           Search for string in screen files
  204.      find.4th            Search for string in ASCII files
  205.      hanoi.4th           Tower of Hanoi Puzzle
  206.      hanoimt.4th         Multitasking Tower of Hanoi (read before
  207.                          compiling)
  208.      iagebnch.4th        Interface Age Magazine benchmark
  209.      index.4th           List first line of each screen in screen file
  210.      interupt.4th        Example of interrupt handling
  211.      kbdr.4th            Example TSR to exchange CapsLock and Ctrl keys
  212.      life.4th            Conway's Life
  213.      list.4th            List a screen file
  214.      queens.4th          Solves Eight Queens puzzle
  215.      scrdif.4th          Compares two screen files
  216.      tail.4th            List first/last n lines/characters of a file
  217.      tr.4th              Translate characters in a file
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.      uniq.4th            Find/delete duplicate lines in a file
  226.      unload.4th          Convert COM to HEX format
  227.      unscreen.4th        Convert screen file to ASCII file
  228.      wc.4th              Count words/lines/pages in a file
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.                                 Limited Warranty
  237.  
  238.      When registered, Thomas Almy warrants the floppy disk and manual to be
  239.      free of defects in material and workmanship for 90 days from date of
  240.      shipment.
  241.  
  242.      Thomas Almy makes no warranty, either expressed or implied, with
  243.      respect to the use of ForthCMP or any of the utility and demo programs
  244.      supplied. You, the user, are expected to evaluate the software for
  245.      appropriateness before registration. Thomas Almy is under no
  246.      circumstances liable for consequential damages or related expenses. In
  247.      any case liability is limited to the registration cost of ForthCMP.
  248.